<template>
  <div class="px-15 pt-2 mb-12 cell_container">
    <div class="bg-white rounded-6 py-6">
      <div class="pl-12 font-bold text-14 mb-5">申请人状态</div>
      <div class="px-8">
        <div class="bg-[#f8f8f8] rounded-6 ">
          <div v-for="(item, i) in applicantPeopleList" :key="i" class="b-b b-b-[#ededed] b-b-solid">
            <div class="px-12 py-10">
              <div class="flex justify-between items-center pb-5">
                <div class="c-[#000] text-14">
                  {{ item.applicant_name }} {{  }}
                </div>
                <div class="text-14 flex items-center" @click="toDetail(item)">
                  {{ applicantStatusTips(item.applicant_status) }}
                  <Right width="12" class="relative top--1 ml-2" color="#999" />
                </div>
              </div>
              <div class="flex justify-between items-center py-5" v-if="item.applicant_status=== 1 || item.applicant_status=== 2">
                <div class="c-[#333] text-13">
                  <!-- {{item.applicant_status=== 1?'请上传材料':item.applicant_status=== 2?'请重新上传材料':''}} -->
                  电子材料
                </div>
                <nut-button type="info" size="small" color="#3d8ffd" @click="toMaterialUpload(item,i)">
                  {{item.applicant_status=== 1?'上传材料':item.applicant_status=== 2?'重新上传材料':''}}
                </nut-button>
              </div>
            </div>
            <div v-if="false">
              <nut-steps>
                <nut-step title="电子资料">
                  1
                  <template #title>
                    <span class="text-13">电子资料</span>
                  </template>
                </nut-step>
                <nut-step title="赴馆通知">
                  2
                  <template #title>
                    <span class="text-13">赴馆通知</span>
                  </template>
                </nut-step>
                <nut-step title="出签结果">
                  3
                  <template #title>
                    <span class="text-13">出签结果</span>
                  </template>
                </nut-step>
              </nut-steps>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup>
import { ref, defineEmits, defineProps, defineExpose, watch } from 'vue'
import { orderStatus, orderDetailStatusTips, visaType, identityTYpe, applicantStatusTips } from '@/utils/type/visa.js'
import { Edit, Plus, Del, Right } from '@nutui/icons-vue';
import { useRoute, useRouter } from 'vue-router'
const router = useRouter()

const emit = defineEmits(['toMaterialUpload'])
const props = defineProps({
  title: {
    type: String,
    required: false
  },
  applicantPeopleList: {
    type: Array,
    required: true
  },
})
let show = ref(false)
let selectedValue = ref([])
const toMaterialUpload = (item, i) => {
  emit('toMaterialUpload', { item, i })
}
const toDetail = (item) => {
  let applicant_status = [5, 6, 14, 15, 16]
  if (applicant_status.includes(item.applicant_status)) {
    let params = {
      applicant_status: item.applicant_status,
      visa_result_url: item.visa_result_url
    }
    router.push({ path: '/visaResult', query: params })
  }
}
// 0已取消 1等待预审 2预审不通过 3等待送签 4使馆审核中 5出签成功 6拒签 7退款中 8退款成功 9等待预约 10待确认 11等待接受资料 12等待培训 13待前往使馆 14拒签(待提交证明) 15拒签(等待审核) 16拒签(审核不通过) 17预审不通过(待退款) 18预约成功
</script>


<style lang="scss" scoped>
</style>